package me.zhengjie.modules.system.repository;

import me.zhengjie.modules.system.domain.Department;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;

/**
* @author Zhang xing wang
* @date 2020-03-26
*/
public interface DepartmentRepository extends JpaRepository<Department, String>, JpaSpecificationExecutor<Department> {

    @Query(value = "select name from department where id = ?1",nativeQuery = true)
    String findNameById(String id);
}